﻿// <copyright file="TranslatorTest.cs" company="QUT">
//     Copyright (c) QUT. All rights reserved.
// </copyright>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Google.KML;
using NUnit.Framework;
using Qut.GenerateKml.Data;

namespace Qut.GenerateKml.Business
{
    /// <summary>
    /// Translator Test.
    /// </summary>
    [TestFixture]
    public class TranslatorTest
    {
        /// <summary>
        /// MapInfo file.
        /// </summary>
        private MapInfoFile mif;

        /// <summary>
        /// The translator instance.
        /// </summary>
        private Translator translator;

        /// <summary>
        /// Google earth document.
        /// </summary>
        private geDocument gd = new geDocument();

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        [SetUp]
        public void Initialize()
        {
            this.mif = new MapInfoFile("QLD_Federal_Electoral_Boundaries.mif", "QLD_Federal_Electoral_Boundaries.mid");
            this.translator = new Translator();
        }

        /// <summary>
        /// Translate 1 test.
        /// </summary>
        [Test]
        public void Translate1()
        {
            this.gd = this.translator.Translate(this.mif);
            Assert.AreEqual(this.gd.Features.Count, 1087);
        }
    }
}
